#ifndef PROXY_EVENT_HANDLER
#define PROXY_EVENT_HANDLER

#include "pipe_module.h"

class IProxyEventHanlder
{
public:
    virtual ~IProxyEventHanlder() {}
    //// event when established connection with client
    //virtual void OnCliConnected() = 0;

    // event when disconnected from client
    virtual void OnCliDisconnected() = 0;

    // event when any error occurred
    virtual void OnCliError(int32 error_code, const char * error_message) = 0;

    // event when received message from client
    virtual void OnCliReceive(const char * message, uint32 message_length) = 0;

    // event when established connection with server
    virtual void OnSvrConnected() = 0;

    // event when disconnected from server
    virtual void OnSvrDisconnected() = 0;

    //// event when any error occurred
    //virtual void OnSvrError(int32 error_code, const char * error_message) = 0;

    // event when received message from server
    virtual void OnSvrReceive(const char * message, uint32 message_length) = 0;

    // event when received message from pipe
    virtual void OnRecvPipeMsg(utility::network::PIPEID pipeID, const char * message, uint32 message_length) = 0;
};

class CProxy;
class IProxyEventHandlerFactory
{
public:
    virtual IProxyEventHanlder * Create(CProxy *) = 0;
};

#endif